package com.renge.eduservice.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.renge.eduservice.entity.EduCourse;
import com.renge.eduservice.entity.json.CourseInfoJson;
import com.renge.eduservice.entity.json.CoursePublishJson;
import com.renge.eduservice.entity.json.FrontCourseInfo;
import com.renge.eduservice.entity.query.CourseQuery;
import com.renge.eduservice.entity.query.FrontCourseVo;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 课程 服务类
 * </p>
 *
 * @author testjava
 * @since 2021-06-04
 */
public interface EduCourseService extends IService<EduCourse> {

    String add(CourseInfoJson courseInfoJson);

    CourseInfoJson getCourseInfoJsonById(String id);

    CoursePublishJson getCoursePublishJsonById(String id);

    IPage<EduCourse> pageCourseList(Page<EduCourse> page, QueryWrapper<EduCourse> wrapper, CourseQuery courseQuery);

    void deleteById(String courseId);

    List<EduCourse> IndexfindCourse();
    //前端课程展示
    Map<String,Object> findFrontAllByPage(Integer current, Integer pagesize, FrontCourseVo frontCourseVo);

    FrontCourseInfo getFrontCourseInformation(String courseid);
}
